﻿@using Library
@model Library.Models.Page

@{
    var pageCulture = Model.PageCultures.SingleOrDefault(pc => pc.Culture == NOWCulture.CurrentCulture);
}
@if (pageCulture != null)
{
    <tr data-id="@Model.Id">
        <td>@Html.DisplayFor(r => pageCulture.WebTitle)</td>
        <td>
            <a class="btn btn-sm btn-info" href="@Url.Action("PageGallery", new {@selectedCulture = NOWCulture.CurrentCulture, @id = Model.Id })" title="@NOWCulture.GetString("Gallery")"><span class="glyphicon glyphicon-picture"></span>@NOWCulture.GetString("Gallery")</a>
            <a class="btn btn-sm btn-primary" href="@Url.Action("EditPage", new {@selectedCulture = NOWCulture.CurrentCulture, @id = Model.Id})" title="@NOWCulture.GetString("Edit")"><span class="glyphicon glyphicon-edit"></span>@NOWCulture.GetString("Edit")</a>
            @if (Model.Id > 100)
            {
                <button type="button" class="btn btn-sm btn-danger" data-editor="remove" data-id="@Model.Id"><span class="glyphicon glyphicon-remove"></span>@NOWCulture.GetString("Remove")</button>
            }
        </td>
    </tr>
}



